POV-Ray : Newsgroups : povray.advanced-users : Object Oriented POV code : Re: Object Oriented POV code Server Time
29 Jul 2024 08:18:47 EDT (-0400)
  Re: Object Oriented POV code  
From: Warp
Date: 23 Feb 2004 05:50:02
Message: <4039dada@news.povray.org>
Christopher James Huff <cja### [at] earthlinknet> wrote:
> >   I don't understand what you are saying.
> >   Why have *two* types of classes when you can have just one?

> I never said anything about two class types...I have no idea how you're 
> reading what I'm trying to say. 

  I can't see interfaces as anything else than very limited classes.

  For example, in Java I see two types of classes: The regular ones
and the extremely limited ones which they call "interfaces".
  What I wonder is why have two types of classes like this when just
one type suffices? IMO interfaces cause more problems than they avoid.

> > And why abstract classes are not useful in single inheritance model?

> Because you can only inherit from one.

  So basically what you want is to support multiple inheritance, but
without the possibility of grouping common functionality to the
"base classes" (ie. "interfaces" in this case) but forcing the inherited
classes to implement everything again and again?

> >   I have never understood what's so good about interfaces.

> They avoid many of the problems of multiple inheritance.

  From the compiler's point of view or the programmer's point of view?

  Can you present a good example?

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.